<?php
echo $header;
echo $sidebar
?>	
<style>
.row-fluid .span5{ width: 12.171%;}
.row-fluid .span12{ width:97%};
hr {
	margin: 20px 0;
	border: 0;
	border-top: 1px solid #eee;
	border-bottom: 1px solid #fff;
}
.span12 .accordion {
	margin: 0;
}
.span12 #accordion2 .accordion-group{
	 border-color:#C5D0DC;margin-bottom:1px;
}

.span12 #accordion2 .accordion-inner{ background:none repeat scroll 0 0 #C5D0DC;}

.span12 #accordion2 .accordion-group .accordion-body{background: none repeat scroll 0 0 #C5D0DC}
.span12 #accordion2 .accordion-group .accordion-inner{border-radius:0;}

</style>	
<div class="span10 content">
    <?php echo $hugemenu ?>

    <?php if ($this->session->flashdata('message')) { ?>
        <div class="alert alert-success">
            <?php echo $this->session->flashdata('message') ?>
        </div>
    <?php } ?>
    <div class="span12">
			<div id="accordion2" class="accordion">
				<?php
				if (!empty($questions)) { ?>
				<?php
				foreach ($questions as $key => $question) { ?>
                <div class="accordion-group">
                  <div class="accordion-heading">
                    <a href="#<?php echo $question['q_id']?>" data-parent="#accordion2" data-toggle="collapse" class="accordion-toggle collapsed">
                      <?php echo $question['question']?> 
                    </a>
                  </div>
                  <div class="accordion-body collapse" id="<?php echo $question['q_id']?>">
                    <div class="accordion-inner">
                     <?php echo $question['answer']?>
                     <hr /><?php
                    
			       echo anchor('faqs/view/edit_question/'.$question['q_id'], 'Edit')?> &nbsp; | &nbsp;  
						<?php echo anchor('faqs/delete_question/'.$question['q_id'], 'Delete')?>
							&nbsp; | &nbsp; 
		
                     Answered by:   <?php echo $question['username']?> 
                    </div>
                  </div>
                </div>
                <?php
				}
				?>
				
				<?php }else{
					
				}
				?>
              </div><br />

	
		<a href='<?php echo site_url()?>/faqs/view/add_question'>
		<button class="btn btn-success span5"><i class='icon-question-sign'></i> &nbsp;Add Question</button>
		</a>
		</div>

</div><!--/content-->

<?php echo $footer ?>